package com.java.rabbitmq.consumer.service;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author Woo_home
 * @create 2020/5/27 14:49
 */

@Component
public class EmailService {

    @RabbitListener(queues = "EmailQueue")
    public void receive(String msg) {
        System.out.println("收到的消息 " + msg);
    }
}
